//
// Created by hjie on 23-8-5.
//
#include <cstring>
#include <cstdint>
#include <cstdlib>
#include <cstdio>
#include <string>
#include "turn_server/turn_server.h"
#include "turn_server/data/nonce_data.h"

int main(int argc, const char * argv[])
{
    if (argc < 2)
    {
        printf("Usage: turn_server_main public_ip.\n");
        return EXIT_FAILURE;
    }
    LoopEvent loop;
    TurnServer server(&loop);
    server.m_config->SetPublicIp(argv[1]);
    server.Listen(10024);
    loop.Run();
    return EXIT_SUCCESS;
}